//
//  HTTPManager.h
//  Castlery
//
//  Created by xie weizhi on 8/8/17.
//  Copyright © 2017 xie weizhi. All rights reserved.
//

#import <AFNetworking/AFHTTPSessionManager.h>

typedef void (^APIClientSuccessBlock)(NSURLSessionDataTask *task, id responseObject);
typedef void (^APIClientFailureBlock)(NSURLSessionDataTask *task, NSError *error);

typedef enum : NSUInteger {
    GET,
    POST,
    PUT
} HTTPMethod;

@interface HTTPManager : AFHTTPSessionManager

+ (instancetype)sharedManager;


- (void)requestWithPath:(NSString *)path
                 params:(NSDictionary *)params
                 method:(HTTPMethod)method
                success:(APIClientSuccessBlock)success
                failure:(APIClientFailureBlock)failure;


@end
